package com.franklin.ideaplugin.easytesting.ui.pressuretest;

import com.intellij.icons.AllIcons;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

/**
 * @author Ye Junhui
 * @since 2023/11/3
 */
@Getter
public class PressureTestConfigDialog extends DialogWrapper {

    private final PressureTestForm pressureTestForm;

    public PressureTestConfigDialog(@NotNull Project project) {
        super(project);
        this.pressureTestForm = new PressureTestForm(project);
        setTitle("Easy-Testing Pressure Test");
        setOKButtonText("Run Task");
        setOKButtonIcon(AllIcons.Actions.Execute);
        init();
    }

    @Override
    protected @Nullable JComponent createCenterPanel() {
        return this.pressureTestForm.getMainPanel();
    }

}
